using FreeSql.DataAnnotations;
using KrasDD.Models;

public class Relationships<S, R> : AppBaseEntity
{
    [JsonProperty, Column(DbType = "char(32)")]
    public string RELATED_ID { get; set; }

    [JsonProperty, Column(DbType = "char(32)", IsNullable = false)]
    public string SOURCE_ID { get; set; }

    [Navigate("RELATED_ID")]
    public R? related { get; set; }

    [Navigate("SOURCE_ID")]
    public S? source { get; set; }
}

public class Relationships<S> : AppBaseEntity
{
    [JsonProperty, Column(DbType = "char(32)", IsNullable = false)]
    public string SOURCE_ID { get; set; }

    [Navigate("SOURCE_ID")]
    public S? source { get; set; }
}
